package cn.ywsj.ywsjmidtier.service;

import cn.ywsj.ywsjmidtier.common.Connect;
import com.alibaba.fastjson.JSONObject;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

@Api(tags = "订单")
@FeignClient(url = Connect.XSX_URL,name = "xsx")
public interface WechatOrderFeign {

    /**
     * 订单列表
     * @param jsonObject
     * @param start
     * @param pageSize
     * @return
     */
    @ApiOperation("订单列表")
    @PostMapping("/wechat/member/ordermgr/ajaxorderlistmerge")
    String myOrderListMerge(@RequestParam("jsonObject")JSONObject jsonObject, @RequestParam("start") Integer start, @RequestParam("pageSize") Integer pageSize);

    /**
     * 订单详情
     * @param jsonObject
     * @return
     */
    @ApiOperation("订单详情")
    @PostMapping("/wechat/member/ordermgr/ajaxorderdetailmerge")
    String ajaxOrderDetailMerge(@RequestParam("jsonObject") JSONObject jsonObject);



    /**
     * 再次购买列表
     * @param jsonObject
     * @param start
     * @param pageSize
     * @return
     */
    @ApiOperation("再次购买列表")
    @PostMapping("/wechat/member/ordermgr/ajaxbuyagainorderlist")
    String ajaxBuyAgainOrderList(@RequestParam("jsonObject")JSONObject jsonObject,@RequestParam("start") Integer start,@RequestParam("pageSize") Integer pageSize);

    /**
     * 订单详情
     * @param orderId
     * @return
     */
    @ApiOperation("订单详情")
    @PostMapping("/wechat/member/ordermgr/ajaxorderdetail")
    String ajaxOrderDetail(@RequestParam("jsonObject")JSONObject jsonObject);

    /**
     * 购物车_订单支付
     * @param jsonObject
     * @return
     */
    @ApiOperation("购物车_订单支付")
    @PostMapping("/wechat/member/ordermgr/ajaxmainorderpayment")
    String ajaxMainOrderPayment(@RequestParam("jsonObject")JSONObject jsonObject);

    /**
     * 开票记录_开票详情
     * @param jsonObject
     * @return
     */
    @ApiOperation("开票记录_开票详情")
    @PostMapping("/wechat/member/ordermgr/queryinvoicedetail")
    String queryInvoiceDetail(@RequestParam("jsonObject")JSONObject jsonObject);

    /**
     * 开票记录_开票记录列表
     * @param state
     * @param pageSize
     * @return
     */
    @ApiOperation("开票记录_开票记录列表")
    @PostMapping("/wechat/member/ordermgr/ajaxinvoicelist")
    String invoiceList(@RequestParam("state")Integer state,@RequestParam("pageSize")Integer pageSize);

}